package data_structures;

public class TestStackQueue {
	public static void main(String[] args) {
		// Create a stack
		MyStack stack = new MyStack();
		
		// Add elements to the stack
		stack.push("Tom"); // Push it to the stack
		System.out.println("(1) " + stack);
	 
		stack.push("John"); // Push it to the stack
		System.out.println("(2) " + stack);
	
		stack.push("George"); // Push it to the stack
		stack.push("Michael"); // Push it to the stack
		System.out.println("(3) " + stack);
	
		// Remove elements from the stack
		System.out.println("(4) " + stack.pop());
		System.out.println("(5) " + stack.pop());
		System.out.println("(6) " + stack);
	
		// Create a queue
		MyQueue queue = new MyQueue();
		
	     // Add elements to the queue
		queue.enqueue("Tom"); // Add it to the queue
		System.out.println("(7) " + queue);
		
		queue.enqueue("John"); // Add it to the queue
		System.out.println("(8) " + queue);
		
		queue.enqueue("George"); // Add it to the queue
		queue.enqueue("Michael"); // Add it to the queue
		System.out.println("(9) " + queue);
	
		// Remove elements from the queue
		System.out.println("(10) " + queue.dequeue());
		System.out.println("(11) " + queue.dequeue());
		System.out.println("(12) " + queue);
	}
}
